package com.haruhi.bot.job.thread;

import com.haruhi.bot.utils.CMDUtil;
import com.haruhi.bot.utils.CommonUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Slf4j
public class ExecuteCMDThread {
    public static ExecutorService threadPool = Executors.newSingleThreadExecutor();

    public static class task implements Runnable{

        private List<String> commands;
        public task(List<String> commands){
            this.commands = commands;
        }

        @Override
        public void run() {
            String s = CMDUtil.execCommand(commands);
            log.info("执行唤醒命令结果:{}",s);
        }
    }

}
